package com.jmyd.sharding.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jmyd.sharding.base.dto.KeywordQueryDto;
import com.jmyd.sharding.domain.po.SysCoupon;
import com.jmyd.sharding.domain.vo.SysCouponVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author samphin
 * @date 2024/6/19 9:46
 */
public interface SysCouponMapper extends BaseMapper<SysCoupon> {
    int deleteByPrimaryKey(Long id);

    int insertSelective(SysCoupon record);

    SysCoupon selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysCoupon record);

    int updateByPrimaryKey(SysCoupon record);

    /**
     * 查询列表
     *
     * @param queryDto
     * @author samphin
     * @date 2024-6-19 10:03:47
     */
    List<SysCouponVo> paging(KeywordQueryDto queryDto);

    /**
     * 查询用户优惠券列表
     *
     * @param userId 用户ID
     */
    List<SysCouponVo> selectUserCouponList(@Param("userId") Long userId);
}